package com.ay.smartpark.sdk.common.base;

import java.util.ArrayList;
import java.util.List;

public class UploadFileResponse {

    public static final String SUCCESS_CODE = "SUCCESS";
    public static final String FAIL_CODE = "FAIL";
    private List<String> data;
    private String code;
    private String error;

    public static String getSuccessCode() {
        return SUCCESS_CODE;
    }

    public static String getFailCode() {
        return FAIL_CODE;
    }

    public List<String> getData() {
        return data;
    }

    public void setData(List<String> data) {
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public static UploadFileResponse success(List<String> data) {
        UploadFileResponse responseBean = new UploadFileResponse();
        responseBean.setData(data);
        responseBean.setCode(SUCCESS_CODE);
        responseBean.setError("");
        return responseBean;
    }

    public static UploadFileResponse fail(String error) {
        UploadFileResponse responseBean = new UploadFileResponse();
        List<String> data = new ArrayList<>();
        responseBean.setData(data);
        responseBean.setCode(FAIL_CODE);
        responseBean.setError(error);
        return responseBean;
    }


}
